import 'package:gluz/generated/json/base/json_field.dart';
import 'package:gluz/generated/json/auth_entity.g.dart';
import 'dart:convert';
export 'package:gluz/generated/json/auth_entity.g.dart';

@JsonSerializable()
class AuthEntity {
	String userId = '';
	String avatar = '';
	String nickName = '';
	String phoneNumber = '';
	String type = '0';
	// 0：未认证，1：认证通过，2：认证失败',
	String authStatus = '0';
	AuthPurchaser? purchaser;
	AuthTranslator? translator;
	AuthServicer? servicer;
	AuthSupplier? supplier;
	AuthTransportAgent? transportAgent;
	AuthPersonal? personal;
	AuthEnterprise? enterprise;

	AuthEntity();

	factory AuthEntity.fromJson(Map<String, dynamic> json) => $AuthEntityFromJson(json);

	Map<String, dynamic> toJson() => $AuthEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AuthPurchaser {
	String userId = '';
	String introduction = '';
	String goodsTypeId = '';
	String licenseImg = '';
	String id = '';
	// 0：未认证，1：认证通过，2：认证失败',
	String status = '0';

	AuthPurchaser();

	factory AuthPurchaser.fromJson(Map<String, dynamic> json) => $AuthPurchaserFromJson(json);

	Map<String, dynamic> toJson() => $AuthPurchaserToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AuthTranslator {
	String userId = '';
	String currentCity = '';
	// 收费标准
	String feeStandards = '';
	String languageAbility = '';
	String professionalScope = '';
	int translatorScore = 0;
	String familiarCity = '';
	String resourceAbility = '';
	String id = '';
	// 0：未认证，1：认证通过，2：认证失败',
	String status = '0';
	String professionalCer = '';

	AuthTranslator();

	factory AuthTranslator.fromJson(Map<String, dynamic> json) => $AuthTranslatorFromJson(json);

	Map<String, dynamic> toJson() => $AuthTranslatorToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AuthServicer {
	String userId = '';
	String undertake = '';
	String busLicense = '';
	String id = '';
	// 0：未认证，1：认证通过，2：认证失败',
	String status = '0';

	AuthServicer();

	factory AuthServicer.fromJson(Map<String, dynamic> json) => $AuthServicerFromJson(json);

	Map<String, dynamic> toJson() => $AuthServicerToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AuthSupplier {
	String userId = '';
	String introduction = '';
	String headImg = '';
	int shipmentAreaId = 0;
	// 发货地址
	String shipmentAreaName = '';
	String companyImg = '';
	String companyAvi = '';
	String coverArea = '';
	String mainBus = '';
	int employees = 0;
	String headerPhone = '';
	String busLicense = '';
	String prodLicense = '';
	String id = '';
	// 行业资质
	String qualifications = '';
	// 0：未认证，1：认证通过，2：认证失败',
	String status = '0';

	AuthSupplier();

	factory AuthSupplier.fromJson(Map<String, dynamic> json) => $AuthSupplierFromJson(json);

	Map<String, dynamic> toJson() => $AuthSupplierToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AuthTransportAgent {
	String userId = '';
	String companyImg = '';
	String companyAvi = '';
	String introduction = '';
	int routeStart = 0;
	int routeEnd = 0;
	String serviceItem = '';
	String serviceMemo = '';
	String feeImg = '';
	String protection = '';
	String busLicense = '';
	String id = '';
	// 0：未认证，1：认证通过，2：认证失败',
	String status = '0';
	List<TransportAgentTask> transportAgentTask = [];

	AuthTransportAgent();

	factory AuthTransportAgent.fromJson(Map<String, dynamic> json) => $AuthTransportAgentFromJson(json);

	Map<String, dynamic> toJson() => $AuthTransportAgentToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AuthPersonal {
	String fullName = '';
	String idNumber = '';
	String idPhotoFront = '';
	String idPhotoBack = '';
	String id = '';
	// 0：未认证，1：认证通过，2：认证失败',
	String status = '0';
	AuthPersonal();

	factory AuthPersonal.fromJson(Map<String, dynamic> json) => $AuthPersonalFromJson(json);

	Map<String, dynamic> toJson() => $AuthPersonalToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AuthEnterprise {
	String entName = '';
	String licenseNumber = '';
	String licensePhoto = '';
	String address = '';
	String legalPerson = '';
	String legalIdNumber = '';
	String legalIdPhotoFront = '';
	String legalIdPhotoBack = '';
	String bankName = '';
	String bankAccountName = '';
	String bankAccountNumber = '';
	String id = '';
	// 0：未认证，1：认证通过，2：认证失败',
	String status = '0';

	AuthEnterprise();

	factory AuthEnterprise.fromJson(Map<String, dynamic> json) => $AuthEnterpriseFromJson(json);

	Map<String, dynamic> toJson() => $AuthEnterpriseToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}


@JsonSerializable()
class TransportAgentTask {
	String? startPoint;
	String? endPoint;

	TransportAgentTask();

	factory TransportAgentTask.fromJson(Map<String, dynamic> json) => $TransportAgentTaskFromJson(json);

	Map<String, dynamic> toJson() => $TransportAgentTaskToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}